from Tkinter import *
from CONSTANTESUNITES import *
from CONSTANTESBATIMENTS import *
    
class Technologie(object):
    def __init__(self,epoque,parent):
        self.epoque = epoque
        self.point=1
        self.parent=parent
        self.Technologies=Toplevel()
        self.width, self.height = self.Technologies.winfo_screenwidth(), self.Technologies.winfo_screenheight()
        self.Technologies.destroy()
        self.bAlphaCentaur=False
        self.bArmeLaser=False
        self.bArmureReflechie=False
        self.bArtisteIllustre=False
        self.bCommerceOceanique=False
        self.bConsciencePublic=False
        self.bDeveloppemenScientifique=False
        self.bEcartPropagante=False
        self.bEchangeRespect=False
        self.bEntrainementRenforcer=False
        self.bEspionage=False
        self.bEsthetique=False
        self.bFurtivite=False
        self.bFusionIntra=False
        self.bImplantationReforme=False
        self.bImplicationEnvironementale=False
        self.bLaserBionique=False
        self.bLaserPuissant=False
        self.bMadScience=False
        self.bMetalurgieAvance=False
        self.bMissionActive=False
        self.bMissionPassive=False
        self.bOnu=False
        self.bProphetie=False
        self.bRelationDiplomatique=False
        self.bRoueElectron=False
        self.bScienceMilitaire=False
        self.bSupraconductivite=False
    def montrer(self):
        self.Technologies.update()
        if self.point ==1:
            self.epoque="Fer"
            self.ageFer()
        if self.point == 2:
            self.epoque="Durium"
            self.ageDurium()
        if self.point == 3:
            self.epoque="Zircon"
            self.ageZircon()
        if self.point == 4:
            self.epoque="Infusion"
            self.ageInfusion()
            
    def ageFer(self):
        if self.bImplicationEnvironementale == True and self.bCommerceOceanique == True and self.bFurtivite == True and self.bMissionActive == True and self.bScienceMilitaire == True and self.bArmeLaser == True and self.bLaserBionique == True and self.bFusionIntra == True and self.bMadScience and self.bOnu == True   :
            pic = PhotoImage(file = 'img/technologies/arbreComplet.gif')
            self.arbreComplet(pic)
        else: 
            x=105
            y=-10
            self.canvasTree=Canvas(self.Technologies, width= 750, heigh=500, bg="black")
            Label(self.Technologies,text="ECONOMIE", foreground="orange",bg='black',bd=3,relief=SUNKEN,width=10).grid(row=4,column=1)
            Label(self.Technologies,text="MILITAIRE", foreground="red",bg='black',bd=3,relief=SUNKEN,width=10).grid(row=9,column=1)
            Label(self.Technologies,text="SCIENTIFIQUE", foreground="green",bg='black',bd=3,relief=SUNKEN,width=10).grid(row=14,column=1)
            Label(self.Technologies,text="FER", foreground="blue",bg='black',bd=5,relief=SUNKEN,width=30).grid(row=1,column=3)
            Button(self.Technologies,text="Ecart de Propagante", command = self.ecartPropagante,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=4,column=2)
            Button(self.Technologies,text="Esthetique", command = self.esthetique,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=2,column=2)
            Button(self.Technologies,text="Relation Diplomatique", command = self.relationDiplomatique,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=7,column=2)
            Button(self.Technologies,text="Entrainement Renforcer", command = self.entrainementRenforcer,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=11,column=2)
            Button(self.Technologies,text="Alpha Centaure", command = self.alphaCentaur,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=13,column=2)
            Button(self.Technologies,text="Metallurgie Avancee", command = self.metalurgieAvance,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=15,column=2)
            Button(self.Technologies,text="Devellopement Scientifique", command = self.developpementScientifique,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=18,column=2)
            self.canvasTree.create_line(70+x,183,200+x,183, fill="red", arrow=LAST)#Relation diplomatique
            self.canvasTree.create_line(70+x,183,222+x,205, fill="red", arrow=LAST)#Relation Diplomatique
            self.canvasTree.create_line(80+x,295,195+x,265, fill="red", arrow=LAST)#Entrainement renforcer
            self.canvasTree.create_line(80+x,295,380+x,295, fill="red", arrow=LAST)#Entrainement renforcer
            self.canvasTree.create_line(90+x,348,203+x,348, fill="green", arrow=LAST)#AlphaCentaur
            self.canvasTree.create_line(90+x,348,203+x,378, fill="green", arrow=LAST)#AlphaCentaur
            self.canvasTree.create_line(50+x,100-y,175+x,100-y, fill="orange", arrow=LAST)
            self.canvasTree.create_line(50+x,100-y,195+x,130-y, fill="orange", arrow=LAST)
            self.canvasTree.create_line(50+x,45-y,200+x,45-y, fill="orange", arrow=LAST)
            self.canvasTree.create_line(105+x,410,203+x,378, fill="green", arrow=LAST)#'etalurgieAvancee
            self.canvasTree.create_line(115+x,480,525+x,480, fill="green", arrow=LAST)#DeveloppenemtScientifique
            self.canvasTree.create_line(105+x,410,195+x,448, fill="green", arrow=LAST)#MetalurgieAvance
            self.canvasTree.create_line(125+x,480,195+x,443, fill="green", arrow=LAST)#Developpement Scientifique
                 
            if self.bEsthetique == True:
                Button(self.Technologies,text="Artiste Illustre", command = self.artisteIllustre,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=2,column=3)
                self.canvasTree.create_line(250+x,45-y,350+x,45-y, fill="orange", arrow=LAST)
            
            if self.bArtisteIllustre ==True:
                Button(self.Technologies,text="Conscience Public", command = self.consciencePublic,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=2,column=4)
                self.canvasTree.create_line(460+x,45-y,500+x,65-y, fill="orange", arrow=LAST)
            
            if self.bConsciencePublic==True:
                Button(self.Technologies,text="Implication Environemmental", command = self.implicationEnvironementale,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=3,column=5)
                self.canvasTree.create_line(600+x,80-y,700+x,80-y, fill="orange", arrow=LAST)
            
            if self.bEcartPropagante == True:
                self.canvasTree.create_line(290+x,130-y,500+x,130-y, fill="orange", arrow=LAST)
                self.canvasTree.create_line(250+x,100-y,380+x,100-y, fill="orange", arrow=LAST)
                Button(self.Technologies,text="Implantation par Reforme", command = self.implantationReforme,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=4,column=3)
                Button(self.Technologies,text="Echange/Respect", command = self.echangeRespect,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=5,column=3)
            else:
                Label(self.Technologies,bg='black',width=20).grid(row=5,column=4)
            
            if self.bImplantationReforme ==True:
                self.canvasTree.create_line(395+x,100-y,700+x,100-y, fill="orange", arrow=LAST)
                Button(self.Technologies,text="Prophetie", command = self.prophetie ,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=4,column=4)
            
            if self.bEchangeRespect ==True:
                Button(self.Technologies,text="Commerce Oceanique", command = self.commerceOceanique,relief=GROOVE,bd=1,fg='orange',bg='black').grid(row=5,column=5)
                self.canvasTree.create_line(550+x,130-y,700+x,130-y, fill="orange", arrow=LAST)
            
            if self.bMissionPassive==True:
                Button(self.Technologies,text="Espionage", command = self.espionage,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=7,column=4)
                Button(self.Technologies,text="Mission Active", command = self.missionActive,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=8,column=4)
                self.canvasTree.create_line(430+x,185,535+x,185, fill="red", arrow=LAST)#Espionage
                self.canvasTree.create_line(430+x,208,700+x,208, fill="red", arrow=LAST)#Mission Active
            
            if self.bOnu==True:
               pass
            else :
                Label(self.Technologies,bg='black',width=1).grid(row=6,column=5)
            
            if self.bArmureReflechie==True:
                if self.bRoueElectron ==True:
                    Button(self.Technologies,text="Science Militaire", command = self.scienceMilitaire,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=10,column=4)
                    self.canvasTree.create_line(410+x,265,700+x,265, fill="red", arrow=LAST)#ScienMilitaire
            else:
                Label(self.Technologies,bg='black',width=20).grid(row=10,column=4)
            
            if self.bEspionage==True:
                Button(self.Technologies,text="Furtivite", command = self.furtivite,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=7,column=5)
                self.canvasTree.create_line(570+x,185,700+x,185, fill="red", arrow=LAST)#Furtivite
            
            if self.bRoueElectron==True:
               pass
            
            if self.bMetalurgieAvance ==True:
                if self.bAlphaCentaur==True:
                    Button(self.Technologies,text="Laser Puissant", command = self.laserPuissant,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=14,column=3)
                    self.canvasTree.create_line(290+x,378,370+x,378, fill="green", arrow=LAST)#LaserPuissant
                    self.canvasTree.create_line(290+x,378,375+x,310, fill="green", arrow=LAST)#LaserPuissant
                if self.bDeveloppemenScientifique==True:
                    Button(self.Technologies,text="SupraConductivite", command = self.supraconductivite,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=17,column=3)
                    self.canvasTree.create_line(195+x,453,360+x,453, fill="green", arrow=LAST)
            
            if self.bSupraconductivite==True:
                Button(self.Technologies,text="Fusion/IntraFusion", command = self.fusionIntra,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=17,column=4)
                self.canvasTree.create_line(450+x,453,700+x,453, fill="green", arrow=LAST)#SupraConductivit
            else:
                Label(self.Technologies,bg='black',width=2).grid(row=17,column=4)
            
            if self.bEntrainementRenforcer==True:
                Button(self.Technologies,text="Armure Reflechie", command = self.armureReflechie,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=10,column=3)
                self.canvasTree.create_line(285+x,265,370+x,265, fill="red", arrow=LAST)#ArmureReflechie
                if self.bLaserPuissant == True:
                    Button(self.Technologies,text="ArmeLaser", command = self.armerLaser,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=11,column=4)
                    self.canvasTree.create_line(430+x,295,700+x,295, fill="red", arrow=LAST)#ArmeLaser
            
            if self.bAlphaCentaur==True:
                self.canvasTree.create_line(280+x,348,370+x,275, fill="green", arrow=LAST)#RoueElectron
                Button(self.Technologies,text="Roue Electron", command = self.roueElectron,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=13,column=3)
            
            if self.bLaserPuissant==True:
                Button(self.Technologies,text="Laser Bionique", command = self.laserBionique,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=14,column=4)
                self.canvasTree.create_line(400+x,378,700+x,378, fill="green", arrow=LAST)#MadScience
            
            if self.bDeveloppemenScientifique==True:
                self.canvasTree.create_line(550+x,480,700+x,480, fill="green", arrow=LAST)#MadScience
                Button(self.Technologies,text="Mad Science", command = self.madScience,relief=GROOVE,bd=1,fg='green',bg='black').grid(row=18,column=5)
            
            if self.bRelationDiplomatique==True:
                Button(self.Technologies,text="Mission Passive", command = self.missionPassive,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=7,column=3)
                Button(self.Technologies,text="ONU", command = self.onu,relief=GROOVE,bd=1,fg='red',bg='black').grid(row=8,column=3)
                self.canvasTree.create_line(275+x,185,375+x,185, fill="red", arrow=LAST)#Mission Passive
                self.canvasTree.create_line(275+x,185,365+x,215, fill="red", arrow=LAST)#Mission Passive
            
            Label(self.Technologies,bg='black',width=1).grid(row=8,column=5)
            Label(self.Technologies,bg='black',width=2).grid(row=16,column=4)
            Label(self.Technologies,bg='black',width=2).grid(row=3,column=4)
            Label(self.Technologies,bg='black',width=2).grid(row=12,column=4)
            self.canvasTree.grid(row=0,column=0,rowspan=20,columnspan=8)
            Label(self.Technologies,bg='black',width=20).grid(row=1,column=4)
            Button(self.Technologies,text="Prochain Age >>",command = self.prochain,fg='white',bg='black',relief=RIDGE,bd=5,width=20).grid(row=1, column=5)
           
        self.Technologies.mainloop()
    
    def metalurgieAvance(self):
        if self.bMetalurgieAvance==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bMetalurgieAvance=True
                CONSTANTESUNITES.rapide['hp']=int(CONSTANTESUNITES.rapide['hp']*1.2)
                CONSTANTESUNITES.lent['hp']=int(CONSTANTESUNITES.lent['hp']*1.2)
                CONSTANTESUNITES.motherShip['hp']=int(CONSTANTESUNITES.motherShip['hp']*1.2)
                CONSTANTESUNITES.shieldDisruptor['hp']=int(CONSTANTESUNITES.shieldDisruptor['hp']*1.2)
                pic = PhotoImage(file = 'img/technologies/metalurgieAvance.gif')
                self.developement('Metalurgie Avancee','Unite attaque +20% hp (rapide,lent,mothership,shieldDisruptor)',pic,345,440)
        self.montrer()
    def esthetique(self):
        if self.bEsthetique==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bEsthetique=True
                structures['centreEchange']['cout']=int(structures['centreEchange']['cout']*0.75)
                structures['centreMilitaire']['cout']=int(structures['centreMilitaire']['cout']*0.75)
                structures['centreSciences']['cout']=int(structures['centreSciences']['cout']*0.75)
                pic = PhotoImage(file = 'img/technologies/esthetique.gif')
                self.developement('Esthetique','Centres Recherche -25% cout (centreSciences,centreMilitaire,centreEchange)',pic,550,413)
        self.montrer()
    def artisteIllustre(self):
        if self.bArtisteIllustre==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bArtisteIllustre=True
                batiments['agricultureFerme']['vitesse']=int(batiments['agricultureFerme']['vitesse']*1.15)
                batiments['agriculturePeche']['vitesse']=int(batiments['agriculturePeche']['vitesse']*1.15)
                pic = PhotoImage(file = 'img/technologies/artisteIllustre.gif')
                self.developement('Artiste Illustre','Agricultre +15% vitesse de production (Ferme , Peche)',pic,344,513)
        self.montrer()
    def consciencePublic(self):
        if self.bConsciencePublic==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bConsciencePublic=True
                batiments['extracteurGaz']['coutGaz']=int(batiments['extracteurGaz']['coutGaz']*0.85)
                batiments['extracteurMinerai']['coutGaz']=int(batiments['extracteurMinerai']['coutGaz']*0.85)
                batiments['extracteurHydroCarburant']['coutGaz']=int(batiments['extracteurHydroCarburant']['coutGaz']*0.85)
                batiments['extracteurGaz']['coutMinerai']=int(batiments['extracteurGaz']['coutMinerai']*0.85)
                batiments['extracteurMinerai']['coutMinerai']=int(batiments['extracteurMinerai']['coutMinerai']*0.85)
                batiments['extracteurHydroCarburant']['coutMinerai']=int(batiments['extracteurHydroCarburant']['coutMinerai']*0.85)
                pic = PhotoImage(file = 'img/technologies/consciencePublic.gif')
                self.developement('Conscience Publique','Construction -15% cout Gaz & cout Minerai (Extracteurs)',pic,320,380)
        self.montrer()
    def ecartPropagante(self):
        if self.bEcartPropagante==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bEcartPropagante=True
                structures['usineDefense']['cout']=int(structures['usineDefense']['cout']*0.9)
                structures['usineAttaque']['cout']=int(structures['usineAttaque']['cout']*0.9)
                pic = PhotoImage(file = 'img/technologies/ecartPropagante.gif')
                self.developement('Ecart Propagante',' Construction -15% cout Usines',pic,381,500)
        self.montrer()
    def implantationReforme(self):
        if self.bImplantationReforme==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bImplantationReforme=True
                CONSTANTESUNITES.guide['hp']=int(CONSTANTESUNITES.guide['range']*1.2)
                CONSTANTESUNITES.apprenti['hp']=int(CONSTANTESUNITES.apprenti['range']*1.2)
                pic = PhotoImage(file = 'img/technologies/reform.gif')
                self.developement('Implantation par la Reforme','Portee +20% (guide,apprenti)',pic,257,208)
        self.montrer()
    def echangeRespect(self):
        if self.bEchangeRespect==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bEchangeRespect=True
                self.parent.joueur.gold=self.parent.joueur.gold*2
                pic = PhotoImage(file = 'img/technologies/echange.gif')
                self.developement('Echange / Respect','Bonus joueur     (GOLD * 2) ',pic,264,265)
        self.montrer()
    def missionPassive(self):
        if self.bMissionPassive==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bMissionPassive=True
                CONSTANTESUNITES.scout['vitesse']=int(CONSTANTESUNITES.scout['vitesse']*1.5)
                CONSTANTESUNITES.reparateur['vitesse']=int(CONSTANTESUNITES.reparateur['vitesse']*1.5)
                pic = PhotoImage(file = 'img/technologies/missionpassive.gif')
                self.developement('Mission Passive','Vitesse des unites passive 150% (scout,reparateur) ',pic,350,389)
        self.montrer()
    def entrainementRenforcer(self):
        if self.bEntrainementRenforcer==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bEntrainementRenforcer=True
                CONSTANTESUNITES.motherShip['hp']=int(CONSTANTESUNITES.motherShip['hp']*1.35)
                CONSTANTESUNITES.lent['hp']=int(CONSTANTESUNITES.lent['hp']*1.35)
                CONSTANTESUNITES.rapide['hp']=int(CONSTANTESUNITES.rapide['hp']*1.35)
                pic = PhotoImage(file = 'img/technologies/entrainementrenforcer.gif')
                self.developement('Entrainement Renforce','Unite Offensive 135% hp ',pic,600,450)
        self.montrer()
    def espionage(self):
        if self.bEspionage==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bEspionage=True
                pic = PhotoImage(file = 'img/technologies/espionage.gif')
                CONSTANTESUNITES.scout['vitesse']=int(CONSTANTESUNITES.scout['vitesse']*1.35)
                self.developement('Espionage','Vitesse des explorateur 135% (scout) ',pic,480,356)
        self.montrer()
    def roueElectron(self):
        if self.bRoueElectron==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bRoueElectron=True
                self.parent.joueur.pScience=self.parent.joueur.pScience+3
                pic = PhotoImage(file = 'img/technologies/rouelectron.gif')
                self.developement('Roue Electron','Bonus point scienctifique +3pts ',pic,450,236)
        self.montrer()
    def laserPuissant(self):
        if self.bLaserPuissant==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bLaserPuissant=True
                CONSTANTESUNITES.motherShip['attaque']=int(CONSTANTESUNITES.motherShip['attaque']*1.35)
                CONSTANTESUNITES.lent['attaque']=int(CONSTANTESUNITES.lent['attaque']*1.35)
                CONSTANTESUNITES.rapide['attaque']=int(CONSTANTESUNITES.rapide['attaque']*1.35)
                pic = PhotoImage(file = 'img/technologies/armelaser.gif')
                self.developement('Laser Puissant','Unite Offensive 135% attaque  ',pic,462,374)
        self.montrer()
    def supraconductivite(self):
        if self.bSupraconductivite==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bSupraconductivite=True
                CONSTANTESUNITES.reparateur['shields']=int(CONSTANTESUNITES.reparateur['shields']*1.20)
                CONSTANTESUNITES.shieldDisruptor['shields']=int(CONSTANTESUNITES.shieldDisruptor['shields']*1.20)
                CONSTANTESUNITES.scout['shields']=int(CONSTANTESUNITES.scout['shields']*1.20)
                CONSTANTESUNITES.motherShip['shields']=int(CONSTANTESUNITES.motherShip['shields']*1.20)
                CONSTANTESUNITES.lent['shields']=int(CONSTANTESUNITES.lent['shields']*1.20)
                CONSTANTESUNITES.rapide['shields']=int(CONSTANTESUNITES.rapide['shields']*1.20)
                CONSTANTESUNITES.guide['shields']=int(CONSTANTESUNITES.guide['shields']*1.20)
                CONSTANTESUNITES.apprenti['shields']=int(CONSTANTESUNITES.apprenti['shields']*1.20)
                pic = PhotoImage(file = 'img/technologies/supraconductivite.gif')
                self.developement('SupraConductivite','Augmentation Unites 120% shields (tous) ',pic,300,243)
        self.montrer()
    def onu(self):
        if self.bOnu==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bOnu=True
                batiments['agricultureFerme']['vitesse']=int(batiments['agricultureFerme']['vitesse']*1.15)
                batiments['agriculturePeche']['vitesse']=int(batiments['agriculturePeche']['vitesse']*1.15)
                batiments['extracteurGaz']['vitesse']=int(batiments['extracteurGaz']['vitesse']*1.15)
                batiments['extracteurMinerai']['vitesse']=int(batiments['extracteurMinerai']['vitesse']*1.15)
                pic = PhotoImage(file = 'img/technologies/onu.gif')
                self.developement('ONU','Vitesse batiment de ressource 115% ',pic,350,311)
        self.montrer()
    def relationDiplomatique(self):
        if self.bRelationDiplomatique==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bRelationDiplomatique=True
                batiments['agricultureFerme']['coutGold']=int(batiments['agricultureFerme']['coutGold']*0.85)
                batiments['agriculturePeche']['coutGold']=int(batiments['agriculturePeche']['coutGold']*0.85)
                batiments['extracteurGaz']['coutGold']=int(batiments['extracteurGaz']['coutGold']*0.85)
                batiments['extracteurMinerai']['coutGold']=int(batiments['extracteurMinerai']['coutGold']*0.85)
                pic = PhotoImage(file = 'img/technologies/diplomatie.gif')
                self.developement('Relation Diplomatique','Cout des batiment en gold -15% ',pic,600,450)
        self.montrer()
    def developpementScientifique(self):
        if self.bDeveloppemenScientifique==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bDeveloppemenScientifique=True
                structures['centreSciences']['cout']=int(structures['centreSciences']['cout']*0.9)
                structures['centreMilitaire']['cout']=int(structures['centreMilitaire']['cout']*0.9)
                structures['centreEchange']['cout']=int(structures['centreEchange']['cout']*0.9)

                pic = PhotoImage(file = 'img/technologies/scientifique.gif')
                self.developement('Developpement Scientifique','Cout centre de developement -10% ',pic,600,400)
        self.montrer()
    def alphaCentaur (self):
        if self.bAlphaCentaur==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bAlphaCentaur=True
                CONSTANTESUNITES.motherShip['vitesse']=int(CONSTANTESUNITES.motherShip['vitesse']*3)
                pic = PhotoImage(file = 'img/technologies/alphacentaur.gif')
                self.developement('Alpha Centaur','Vitesse des MotherShip 300% ',pic,443,290)
        self.montrer()
    def armureReflechie(self):
        if self.bArmureReflechie==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bArmureReflechie=True
                CONSTANTESUNITES.shieldDisruptor['vitesse']=int(CONSTANTESUNITES.shieldDisruptor['vitesse']*2)
                pic = PhotoImage(file = 'img/technologies/armurereflechie.gif')
                self.developement('Armure Reflechie','Vitesse ShieldDisruptor 200% ',pic,312,437)
        self.montrer()
    def prophetie(self):
        if self.bProphetie==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bProphetie=True
                etoile = self.parent.joueur.etoiles[0]
                self.parent.univers.tabEtoiles[etoile].populationMax*1.5
                pic = PhotoImage(file = 'img/technologies/prophetie.gif')
                self.developement('Prophetie','Population de premiere planete 150% ',pic,400,239)
        self.montrer()
    def missionActive(self):
        if self.bMissionActive==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bMissionActive=True
                CONSTANTESUNITES.rapide['attaque']=int(CONSTANTESUNITES.rapide['attaque']*1.35)
                pic = PhotoImage(file = 'img/technologies/missionActive.gif')
                self.developement('Mission Active','Augmentation attaque 1.35 (Rapide) ',pic,468,311)
        self.montrer()
    def scienceMilitaire(self):
        if self.bScienceMilitaire==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bScienceMilitaire=True
                self.parent.joueur.pMilitaire=self.parent.joueur.pMilitaire+3
                pic = PhotoImage(file = 'img/technologies/scienceMilitaire.gif')
                self.developement('Science Militaire','Bonus de point Militaire +3 ',pic,363,245)
        self.montrer()
    def armerLaser(self):
        if self.bArmeLaser==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bArmeLaser=True
                CONSTANTESUNITES.rapide['attaque']=int(CONSTANTESUNITES.rapide['attaque']*1.35)
                CONSTANTESUNITES.lent['attaque']=int(CONSTANTESUNITES.lent['attaque']*1.35)
                CONSTANTESUNITES.motherShip['attaque']=int(CONSTANTESUNITES.motherShip['attaque']*1.35)
                pic = PhotoImage(file = 'img/technologies/armeLaserPuissant.gif')
                self.developement('Arme Laser','Augmentation attque 1.35 (Rapide, Lent, MotherShip',pic,212,120)
        self.montrer()
    def laserBionique(self):
        if self.bLaserBionique==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bLaserBionique=True
                CONSTANTESUNITES.shieldDisruptor['range']=int(CONSTANTESUNITES.shieldDisruptor['range']*1.35)
                pic = PhotoImage(file = 'img/technologies/laserBionique.gif')
                self.developement('Laser Bionique','Porter des lasere 140% (shieldDisruptor) ',pic,500,375)
        self.montrer()
    def fusionIntra(self):
        if self.bFusionIntra==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bFusionIntra=True
                self.bSupraconductivite=True
                CONSTANTESUNITES.reparateur['vitesse']=int(CONSTANTESUNITES.reparateur['vitesse']*1.20)
                CONSTANTESUNITES.shieldDisruptor['vitesse']=int(CONSTANTESUNITES.shieldDisruptor['vitesse']*1.20)
                CONSTANTESUNITES.scout['vitesse']=int(CONSTANTESUNITES.scout['vitesse']*1.20)
                CONSTANTESUNITES.motherShip['vitesse']=int(CONSTANTESUNITES.motherShip['vitesse']*1.20)
                CONSTANTESUNITES.lent['vitesse']=int(CONSTANTESUNITES.lent['vitesse']*1.20)
                CONSTANTESUNITES.rapide['vitesse']=int(CONSTANTESUNITES.rapide['vitesse']*1.20)
                CONSTANTESUNITES.guide['vitesse']=int(CONSTANTESUNITES.guide['vitesse']*1.20)
                CONSTANTESUNITES.apprenti['vitesse']=int(CONSTANTESUNITES.apprenti['vitesse']*1.20)
                pic = PhotoImage(file = 'img/technologies/fusion.gif')
                self.developement('Fusion-IntaFusion','Augmentation Unites  Vitesse 120% (toutes) ',pic,546,476)
        self.montrer()
    def madScience(self):
        if self.bMadScience==True:
            self.technologieAquis()
        else:
            if self.verification('S'):
                self.bMadScience=True
                etoile = self.parent.joueur.etoiles[0]
                self.parent.univers.tabEtoiles[etoile].gazMax*1.5
                self.parent.univers.tabEtoiles[etoile].gaz*1.5
                pic = PhotoImage(file = 'img/technologies/madScience.gif')
                self.developement('Mad Science','Augmenation de maximum de gax et de gaz pour Etoile Mere ',pic,470,466)
        self.montrer()
    def furtivite(self):
        if self.bFurtivite==True:
            self.technologieAquis()
        else:
            if self.verification('M'):
                self.bFurtivite=True
                CONSTANTESUNITES.reparateur['range']=int(CONSTANTESUNITES.reparateur['range']*1.35)
                pic = PhotoImage(file = 'img/technologies/furtivite.gif')
                self.developement('Furtivite','Augmentation de la portee reparateur 135% ',pic,380,396)
        self.montrer()
    def commerceOceanique(self):
        if self.bCommerceOceanique==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bCommerceOceanique=True
                self.parent.joueur.pEchange=self.parent.joueur.pEchange+3
                pic = PhotoImage(file = 'img/technologies/commerceOceanique.gif')
                self.developement('Commerce Oceanique','Bonus des points Echange +3 ',pic,400,300)
        self.montrer()
    def implicationEnvironementale(self):
        if self.bImplicationEnvironementale==True:
            self.technologieAquis()
        else:
            if self.verification('E'):
                self.bImplicationEnvironementale=True
                batiments['agricultureFerme']['coutGaz']=int(batiments['agricultureFerme']['coutGaz']*0.75)
                batiments['agriculturePeche']['coutGaz']=int(batiments['agriculturePeche']['coutGaz']*0.75)
                batiments['extracteurGaz']['coutGaz']=int(batiments['extracteurGaz']['coutGaz']*0.75)
                batiments['extracteurMinerai']['coutGaz']=int(batiments['extracteurMinerai']['coutGaz']*0.75)
                batiments['agricultureFerme']['coutMinerai']=int(batiments['agricultureFerme']['coutMinerai']*0.75)
                batiments['agriculturePeche']['coutMinerai']=int(batiments['agriculturePeche']['coutMinerai']*0.75)
                batiments['extracteurGaz']['coutMinerai']=int(batiments['extracteurGaz']['coutMinerai']*0.75)
                batiments['extracteurMinerai']['coutMinerai']=int(batiments['extracteurMinerai']['coutMinerai']*0.75)
                batiments['agricultureFerme']['coutGaz']=int(batiments['agricultureFerme']['coutGaz']*1.15)
                batiments['agriculturePeche']['coutGaz']=int(batiments['agriculturePeche']['coutGaz']*1.15)
                batiments['extracteurGaz']['coutGaz']=int(batiments['extracteurGaz']['coutGaz']*1.15)
                batiments['extracteurMinerai']['coutGaz']=int(batiments['extracteurMinerai']['coutGaz']*1.15)
                pic = PhotoImage(file = 'img/technologies/implicationEnvironemental.gif')
                self.developement('Implication Environementale','Modification des cout de batiment -25% ressources +15% gold ',pic,300,232)
        self.montrer()
    def verification(self,type):
        if type =='M':
            if self.parent.joueur.pMilitaire>4:
                self.parent.joueur.pMilitaire=self.parent.joueur.pMilitaire-5
                return True
            else:
                self.pointManquant()

        else:
            if type=='S':
                if self.parent.joueur.pScience>4:
                    self.parent.joueur.pScience=self.parent.joueur.pScience-5
                    return True
                else:
                    self.pointManquant()

            else:
                if type=='E':
                    if self.parent.joueur.pEchange>4:
                        self.parent.joueur.pEchange=self.parent.joueur.pEchange-5
                        return True
                    else:
                        self.pointManquant()
    def developement(self,tech,upgrade,img,h,w):
        self.message=Toplevel(bg='black',relief=RIDGE,bd=5)
        self.message.title("Developpement Technologique")
        self.message.geometry('+%d+%d' %(self.width/6, self.height/6) )
        Label(self.message,text='La Technologie '+tech+' a ete developpe',bg='black',fg='CornflowerBlue',font=("Helvetica", 14, "bold italic")).pack()
        can=Canvas(self.message,width=h,height=w,bg='black')
        can.create_image(1,1,image=img,anchor=NW)
        can.pack()
        Label(self.message,text='Vous obtenez :'+upgrade,bg='black',fg='CornflowerBlue',font=("Helvetica", 15, "bold")).pack()
        Button(self.message,text='ok',command=self.quitter,bg="grey15",fg="CornflowerBlue",activebackground="grey10",activeforeground="CornflowerBlue",font=("Helvetica", 10, "bold"),relief=RIDGE).pack()
        
    def pointManquant(self):
        self.message=Toplevel(bg='black',relief=SUNKEN,bd=5)
        self.message.title("Info Technologie")
        self.message.geometry('+%d+%d' %(self.width/6, self.height/6) )
        Label(self.message,text='Point de Technologie Insuffisant',bg='black',fg='CornflowerBlue',font=("Helvetica", 20, "bold italic")).pack()
        Button(self.message,text='ok',command=self.quitter,bg="grey15",fg="CornflowerBlue",activebackground="grey10",activeforeground="CornflowerBlue",font=("Helvetica", 10, "bold"),relief=RIDGE).pack()
    
    def technologieAquis(self):
        self.message=Toplevel(bg='black',relief=SUNKEN,bd=5)
        self.message.title("Info Technologie")
        self.message.geometry('+%d+%d' %(self.width/6, self.height/6) )
        Label(self.message,text='Cette Technologie a deja ete developpe',bg='black',fg='CornflowerBlue',font=("Helvetica", 20, "bold italic")).pack()
        Button(self.message,text='ok',command=self.quitter,bg="grey15",fg="CornflowerBlue",activebackground="grey10",activeforeground="CornflowerBlue",font=("Helvetica", 10, "bold"),relief=RIDGE).pack()
        
    def quitter(self):
        self.message.destroy()
    def ageZircon(self):
        x=105
        A=Canvas(self.Technologies, width= 750, heigh=500, bg="black")
        self.canvasTree.create_line(100,10,100,500,fill="blue")
        self.canvasTree.create_line(0,30,1000,30,fill="blue", dash=(100))
        self.canvasTree.create_line(0,165,1000,165,fill="blue", dash=(100))
        self.canvasTree.create_line(0,325,1000,325,fill="blue", dash=(100))
        self.canvasTree.create_line(0,495,1000,495,fill="blue", dash=(100))
        self.canvasTree.create_line(50+x,45,200+x,45, fill="orange", arrow=LAST)
        self.canvasTree.create_line(50+x,110,175+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(50+x,110,195+x,140, fill="orange", arrow=LAST)
        self.canvasTree.create_line(250+x,45,350+x,45, fill="orange", arrow=LAST)
        self.canvasTree.create_line(460+x,45,500+x,65, fill="orange", arrow=LAST)
        self.canvasTree.create_line(250+x,110,380+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(380+x,110,700+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(300+x,150,480+x,150, fill="orange", arrow=LAST)
        self.canvasTree.create_line(550+x,150,700+x,150, fill="orange", arrow=LAST)
        self.canvasTree.create_line(600+x,80,700+x,80, fill="orange", arrow=LAST)
        self.canvasTree.create_line(75+x,183,200+x,183, fill="red", arrow=LAST)#Relation diplomatique
        self.canvasTree.create_line(75+x,183,222+x,218, fill="red", arrow=LAST)#Relation Diplomatique
        self.canvasTree.create_line(275+x,183,375+x,183, fill="red", arrow=LAST)#Mission Passive
        self.canvasTree.create_line(275+x,183,365+x,218, fill="red", arrow=LAST)#Mission Passive
        self.canvasTree.create_line(430+x,183,525+x,183, fill="red", arrow=LAST)#Espionage
        self.canvasTree.create_line(430+x,218,700+x,218, fill="red", arrow=LAST)#Mission Active
        self.canvasTree.create_line(570+x,183,700+x,183, fill="red", arrow=LAST)#Furtivite
        self.canvasTree.create_line(80+x,310,195+x,275, fill="red", arrow=LAST)#Entrainement renforcer
        self.canvasTree.create_line(80+x,310,375+x,310, fill="red", arrow=LAST)#Entrainement renforcer
        self.canvasTree.create_line(430+x,310,700+x,310, fill="red", arrow=LAST)#ArmeLaser
        self.canvasTree.create_line(295+x,275,360+x,275, fill="red", arrow=LAST)#ArmureReflechie
        self.canvasTree.create_line(410+x,275,700+x,275, fill="red", arrow=LAST)#ScienMilitaire
        self.canvasTree.create_line(90+x,348,203+x,348, fill="green", arrow=LAST)#AlphaCentaur
        self.canvasTree.create_line(118+x,410,203+x,378, fill="green", arrow=LAST)#'etalurgieAvancee
        self.canvasTree.create_line(115+x,480,510+x,480, fill="green", arrow=LAST)#DeveloppenemtScientifique
        self.canvasTree.create_line(118+x,410,195+x,448, fill="green", arrow=LAST)#MetalurgieAvance
        self.canvasTree.create_line(90+x,348,203+x,378, fill="green", arrow=LAST)#AlphaCentaur
        self.canvasTree.create_line(140+x,480,195+x,448, fill="green", arrow=LAST)#Developpement Scientifique
        self.canvasTree.create_line(290+x,348,360+x,275, fill="green", arrow=LAST)#RoueElectron
        self.canvasTree.create_line(290+x,378,370+x,378, fill="green", arrow=LAST)#LaserPuissant
        self.canvasTree.create_line(290+x,378,375+x,310, fill="green", arrow=LAST)#LaserPuissant
        self.canvasTree.create_line(550+x,480,700+x,480, fill="green", arrow=LAST)#MadScience
        self.canvasTree.create_line(195+x,448,360+x,448, fill="green", arrow=LAST)#SupraConductivite
        self.canvasTree.create_line(400+x,378,700+x,378, fill="green", arrow=LAST)#MadScience
        self.canvasTree.create_line(450+x,448,700+x,448, fill="green", arrow=LAST)#SupraConductivit
        self.canvasTree.grid(row=0,column=0,rowspan=20,columnspan=8)
        Label(self.Technologies,text="ECONOMIE", foreground="blue").grid(row=4,column=1)
        Label(self.Technologies,text="MILITAIRE", foreground="blue").grid(row=9,column=1)
        Label(self.Technologies,text="SCIENTIFIQUE", foreground="blue").grid(row=14,column=1)
        #Label(Zircon,text="FER", width=30, foreground="blue").grid(row=1,column=3)
        Label(self.Technologies,text="ZIRCON", width=30, foreground="blue").grid(row=1,column=3)
        #Label(Zircon,text="DURIUM", width=30, foreground="blue").grid(row=1,column=3)
        #Label(Zircon,text="INFUSION", width=30, foreground="blue").grid(row=1,column=3)
        Button(self.Technologies,text="Rebelion Religieuse", command = self.patch).grid(row=3,column=2)
        Button(self.Technologies,text="Liberte Religieuse", command = self.patch).grid(row=4,column=2)
        Button(self.Technologies,text="Recyclage", command = self.patch).grid(row=5,column=2)
        Button(self.Technologies,text="MassMedia", command = self.patch).grid(row=2,column=3)
        Button(self.Technologies,text="Controle Papale", command = self.patch).grid(row=4,column=3)
        Button(self.Technologies,text="Conscientisation", command = self.patch).grid(row=2,column=4)
        Button(self.Technologies,text="Anarchie Controler", command = self.patch).grid(row=4,column=4)
        Button(self.Technologies,text="Transport Public", command = self.patch).grid(row=5,column=3)
        Button(self.Technologies,text="Aide Generaliser", command = self.patch).grid(row=5,column=4)
        Button(self.Technologies,text="Desastre Naturel Dinimuer", command = self.patch).grid(row=3,column=5)
       
        Button(self.Technologies,text="IDS", command = self.patch).grid(row=7,column=3)
        Button(self.Technologies,text="Missile Long Portee", command = self.patch).grid(row=8,column=3)
        Button(self.Technologies,text="Protection System", command = self.patch).grid(row=10,column=3)
        Button(self.Technologies,text="Sphere de protection", command = self.patch).grid(row=13,column=3)
        Button(self.Technologies,text="Vol Avancee", command = self.patch).grid(row=14,column=3)
        Button(self.Technologies,text="Amelioration Zircon", command = self.patch).grid(row=17,column=3)
        Button(self.Technologies,text="Agence de Securite", command = self.patch).grid(row=4,column=4)
        Button(self.Technologies,text="Laser Plasma", command = self.patch).grid(row=2,column=4)
        Button(self.Technologies,text="Bouclier Energetique", command = self.patch).grid(row=7,column=4)
        Button(self.Technologies,text="Agence de Renseignement", command = self.patch).grid(row=8,column=4)
        Button(self.Technologies,text="Unite Special", command = self.patch).grid(row=10,column=4)
        Button(self.Technologies,text="Lointan Rocket", command = self.patch).grid(row=11,column=4)
        Button(self.Technologies,text="Propulsion Laser", command = self.patch).grid(row=14,column=4)
        Button(self.Technologies,text="Fission", command = self.patch).grid(row=17,column=4)
        Button(self.Technologies,text="Concentration Evolutive", command = self.patch).grid(row=5,column=5)
        Button(self.Technologies,text="Plasma", command = self.patch).grid(row=3,column=5)
        Button(self.Technologies,text="Zircon", command = self.patch).grid(row=7,column=5)
        Button(self.Technologies,text="Replaceable Part", command = self.patch).grid(row=18,column=5)
        Button(self.Technologies,text="Astronomy ++", command = self.patch).grid(row=3,column=5)
        Button(self.Technologies,text="Magnetisme Universel", command = self.patch).grid(row=7,column=5)
        Button(self.Technologies,text="Decendance Extraterrestre", command = self.patch).grid(row=18,column=5)
        Button(self.Technologies,text="Prochain Age >>",command = self.prochain).grid(row=1, column=5)
        Button(self.Technologies,text="<< Age Precedent",command = self.precedent).grid(row=1, column=2)
        self.Technologies.mainloop()
        
    def ageDurium(self):
        x=105
        A=Canvas(self.Technologies, width= 750, heigh=500, bg="black")
        self.canvasTree.create_line(100,10,100,500,fill="blue")
        self.canvasTree.create_line(0,30,1000,30,fill="blue", dash=(100))
        self.canvasTree.create_line(0,165,1000,165,fill="blue", dash=(100))
        self.canvasTree.create_line(0,325,1000,325,fill="blue", dash=(100))
        self.canvasTree.create_line(0,495,1000,495,fill="blue", dash=(100))
        self.canvasTree.create_line(50+x,45,200+x,45, fill="orange", arrow=LAST)
        self.canvasTree.create_line(50+x,110,175+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(50+x,110,195+x,140, fill="orange", arrow=LAST)
        self.canvasTree.create_line(250+x,45,350+x,45, fill="orange", arrow=LAST)
        self.canvasTree.create_line(460+x,45,500+x,65, fill="orange", arrow=LAST)
        self.canvasTree.create_line(250+x,110,380+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(380+x,110,700+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(300+x,150,480+x,150, fill="orange", arrow=LAST)
        self.canvasTree.create_line(550+x,150,700+x,150, fill="orange", arrow=LAST)
        self.canvasTree.create_line(600+x,80,700+x,80, fill="orange", arrow=LAST)
        self.canvasTree.create_line(75+x,183,200+x,183, fill="red", arrow=LAST)#Relation diplomatique
        self.canvasTree.create_line(75+x,183,222+x,218, fill="red", arrow=LAST)#Relation Diplomatique
        self.canvasTree.create_line(275+x,183,375+x,183, fill="red", arrow=LAST)#Mission Passive
        self.canvasTree.create_line(275+x,183,365+x,218, fill="red", arrow=LAST)#Mission Passive
        self.canvasTree.create_line(430+x,183,525+x,183, fill="red", arrow=LAST)#Espionage
        self.canvasTree.create_line(430+x,218,700+x,218, fill="red", arrow=LAST)#Mission Active
        self.canvasTree.create_line(570+x,183,700+x,183, fill="red", arrow=LAST)#Furtivite
        self.canvasTree.create_line(80+x,310,195+x,275, fill="red", arrow=LAST)#Entrainement renforcer
        self.canvasTree.create_line(80+x,310,375+x,310, fill="red", arrow=LAST)#Entrainement renforcer
        self.canvasTree.create_line(430+x,310,700+x,310, fill="red", arrow=LAST)#ArmeLaser
        self.canvasTree.create_line(295+x,275,360+x,275, fill="red", arrow=LAST)#ArmureReflechie
        self.canvasTree.create_line(410+x,275,700+x,275, fill="red", arrow=LAST)#ScienMilitaire
        self.canvasTree.create_line(90+x,348,203+x,348, fill="green", arrow=LAST)#AlphaCentaur
        self.canvasTree.create_line(118+x,410,203+x,378, fill="green", arrow=LAST)#'etalurgieAvancee
        self.canvasTree.create_line(115+x,480,510+x,480, fill="green", arrow=LAST)#DeveloppenemtScientifique
        self.canvasTree.create_line(118+x,410,195+x,448, fill="green", arrow=LAST)#MetalurgieAvance
        self.canvasTree.create_line(90+x,348,203+x,378, fill="green", arrow=LAST)#AlphaCentaur
        self.canvasTree.create_line(140+x,480,195+x,448, fill="green", arrow=LAST)#Developpement Scientifique
        self.canvasTree.create_line(290+x,348,360+x,275, fill="green", arrow=LAST)#RoueElectron
        self.canvasTree.create_line(290+x,378,370+x,378, fill="green", arrow=LAST)#LaserPuissant
        self.canvasTree.create_line(290+x,378,375+x,310, fill="green", arrow=LAST)#LaserPuissant
        self.canvasTree.create_line(550+x,480,700+x,480, fill="green", arrow=LAST)#MadScience
        self.canvasTree.create_line(195+x,448,360+x,448, fill="green", arrow=LAST)#SupraConductivite
        self.canvasTree.create_line(400+x,378,700+x,378, fill="green", arrow=LAST)#MadScience
        self.canvasTree.create_line(450+x,448,700+x,448, fill="green", arrow=LAST)#SupraConductivit
        self.canvasTree.grid(row=0,column=0,rowspan=20,columnspan=8)
        Label(self.Technologies,text="ECONOMIE", foreground="blue").grid(row=4,column=1)
        Label(self.Technologies,text="MILITAIRE", foreground="blue").grid(row=9,column=1)
        Label(self.Technologies,text="SCIENTIFIQUE", foreground="blue").grid(row=14,column=1)
        #Label(Durium,text="FER", width=30, foreground="blue").grid(row=1,column=3)
        #Label(Durium,text="Durium", width=30, foreground="blue").grid(row=1,column=3)
        Label(self.Technologies,text="DURIUM", width=30, foreground="blue").grid(row=1,column=3)
        #Label(Durium,text="INFUSION", width=30, foreground="blue").grid(row=1,column=3)
        Button(self.Technologies,text="Miracle", command = self.patch).grid(row=4,column=2)
        Button(self.Technologies,text="Clean Up", command = self.patch).grid(row=2,column=2)
        Button(self.Technologies,text="Taux Interet", command = self.patch).grid(row=7,column=2)
        Button(self.Technologies,text="Productivite", command = self.patch).grid(row=11,column=2)
        Button(self.Technologies,text="Impact Humain", command = self.patch).grid(row=13,column=2)
        Button(self.Technologies,text="Nature Humaine", command = self.patch).grid(row=15,column=2)
        Button(self.Technologies,text="Taxation au Developpement", command = self.patch).grid(row=18,column=2)
        Button(self.Technologies,text="Politic Imersive", command = self.patch).grid(row=5,column=3)
        Button(self.Technologies,text="Neutralite", command = self.patch).grid(row=4,column=3)
        Button(self.Technologies,text="Devellopement Rapide", command = self.patch).grid(row=2,column=3)
        Button(self.Technologies,text="Surproduction", command = self.patch).grid(row=7,column=3)
        Button(self.Technologies,text="Deshospitalisation", command = self.patch).grid(row=8,column=3)
        Button(self.Technologies,text="Etoile de Protection", command = self.patch).grid(row=10,column=3)
        Button(self.Technologies,text="Armure Alien", command = self.patch).grid(row=13,column=3)
        Button(self.Technologies,text="Attaque Lointaine", command = self.patch).grid(row=14,column=3)
        Button(self.Technologies,text="Stargate Program", command = self.patch).grid(row=17,column=3)
        Button(self.Technologies,text="X_FILES", command = self.patch).grid(row=4,column=4)
        Button(self.Technologies,text="Bloqueur", command = self.patch).grid(row=2,column=4)
        Button(self.Technologies,text="Colonisation ", command = self.patch).grid(row=7,column=4)
        Button(self.Technologies,text="Lie Policy", command = self.patch).grid(row=8,column=4)
        Button(self.Technologies,text="UBERUnits", command = self.patch).grid(row=10,column=4)
        Button(self.Technologies,text="Patrouilleur Planetaire", command = self.patch).grid(row=11,column=4)
        Button(self.Technologies,text="Science Arme", command = self.patch).grid(row=14,column=4)
        Button(self.Technologies,text="Science Applique", command = self.patch).grid(row=17,column=4)
        Button(self.Technologies,text="Vitess Froide", command = self.patch).grid(row=5,column=5)
        Button(self.Technologies,text="Durium", command = self.patch).grid(row=3,column=5)
        Button(self.Technologies,text="Controle tour de verre", command = self.patch).grid(row=7,column=5)
        Button(self.Technologies,text="Anti-Deflagration", command = self.patch).grid(row=18,column=5)
        Button(self.Technologies,text="Matiere / anti-Matiere", command = self.patch).grid(row=3,column=5)
        Button(self.Technologies,text="Deplacement de l'univers", command = self.patch).grid(row=7,column=5)
        Button(self.Technologies,text="Demolecularisation", command = self.patch).grid(row=18,column=5) 
        Button(self.Technologies,text="Prochain Age >>",command = self.prochain).grid(row=1, column=5)
        Button(self.Technologies,text="<< Age Precedent",command = self.precedent).grid(row=1, column=2)
        self.Technologies.mainloop()
        
    def ageInfusion(self):
        x=105
        A=Canvas(self.Technologies, width= 750, heigh=500, bg="black")
        self.canvasTree.create_line(100,10,100,500,fill="blue")
        self.canvasTree.create_line(0,30,1000,30,fill="blue", dash=(100))
        self.canvasTree.create_line(0,165,1000,165,fill="blue", dash=(100))
        self.canvasTree.create_line(0,325,1000,325,fill="blue", dash=(100))
        self.canvasTree.create_line(0,495,1000,495,fill="blue", dash=(100))
        self.canvasTree.create_line(50+x,45,200+x,45, fill="orange", arrow=LAST)
        self.canvasTree.create_line(50+x,110,175+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(50+x,110,195+x,140, fill="orange", arrow=LAST)
        self.canvasTree.create_line(250+x,45,350+x,45, fill="orange", arrow=LAST)
        self.canvasTree.create_line(460+x,45,500+x,65, fill="orange", arrow=LAST)
        self.canvasTree.create_line(250+x,110,380+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(380+x,110,700+x,110, fill="orange", arrow=LAST)
        self.canvasTree.create_line(300+x,150,480+x,150, fill="orange", arrow=LAST)
        self.canvasTree.create_line(550+x,150,700+x,150, fill="orange", arrow=LAST)
        self.canvasTree.create_line(600+x,80,700+x,80, fill="orange", arrow=LAST)
        self.canvasTree.create_line(75+x,183,200+x,183, fill="red", arrow=LAST)#Relation diplomatique
        self.canvasTree.create_line(75+x,183,222+x,218, fill="red", arrow=LAST)#Relation Diplomatique
        self.canvasTree.create_line(275+x,183,375+x,183, fill="red", arrow=LAST)#Mission Passive
        self.canvasTree.create_line(275+x,183,365+x,218, fill="red", arrow=LAST)#Mission Passive
        self.canvasTree.create_line(430+x,183,525+x,183, fill="red", arrow=LAST)#Espionage
        self.canvasTree.create_line(430+x,218,700+x,218, fill="red", arrow=LAST)#Mission Active
        self.canvasTree.create_line(570+x,183,700+x,183, fill="red", arrow=LAST)#Furtivite
        self.canvasTree.create_line(80+x,310,195+x,275, fill="red", arrow=LAST)#Entrainement renforcer
        self.canvasTree.create_line(80+x,310,375+x,310, fill="red", arrow=LAST)#Entrainement renforcer
        self.canvasTree.create_line(430+x,310,700+x,310, fill="red", arrow=LAST)#ArmeLaser
        self.canvasTree.create_line(295+x,275,360+x,275, fill="red", arrow=LAST)#ArmureReflechie
        self.canvasTree.create_line(410+x,275,700+x,275, fill="red", arrow=LAST)#ScienMilitaire
        self.canvasTree.create_line(90+x,348,203+x,348, fill="green", arrow=LAST)#AlphaCentaur
        self.canvasTree.create_line(118+x,410,203+x,378, fill="green", arrow=LAST)#'etalurgieAvancee
        self.canvasTree.create_line(115+x,480,510+x,480, fill="green", arrow=LAST)#DeveloppenemtScientifique
        self.canvasTree.create_line(118+x,410,195+x,448, fill="green", arrow=LAST)#MetalurgieAvance
        self.canvasTree.create_line(90+x,348,203+x,378, fill="green", arrow=LAST)#AlphaCentaur
        self.canvasTree.create_line(140+x,480,195+x,448, fill="green", arrow=LAST)#Developpement Scientifique
        self.canvasTree.create_line(290+x,348,360+x,275, fill="green", arrow=LAST)#RoueElectron
        self.canvasTree.create_line(290+x,378,370+x,378, fill="green", arrow=LAST)#LaserPuissant
        self.canvasTree.create_line(290+x,378,375+x,310, fill="green", arrow=LAST)#LaserPuissant
        self.canvasTree.create_line(550+x,480,700+x,480, fill="green", arrow=LAST)#MadScience
        self.canvasTree.create_line(195+x,448,360+x,448, fill="green", arrow=LAST)#SupraConductivite
        self.canvasTree.create_line(400+x,378,700+x,378, fill="green", arrow=LAST)#MadScience
        self.canvasTree.create_line(450+x,448,700+x,448, fill="green", arrow=LAST)#SupraConductivit
        self.canvasTree.grid(row=0,column=0,rowspan=20,columnspan=8)
        Label(self.Technologies,text="ECONOMIE", foreground="blue").grid(row=4,column=1)
        Label(self.Technologies,text="MILITAIRE", foreground="blue").grid(row=9,column=1)
        Label(self.Technologies,text="SCIENTIFIQUE", foreground="blue").grid(row=14,column=1)
        #Label(Zircon,text="FER", width=30, foreground="blue").grid(row=1,column=3)
        #Label(Zircon,text="ZIRCON", width=30, foreground="blue").grid(row=1,column=3)
        #Label(Zircon,text="DURIUM", width=30, foreground="blue").grid(row=1,column=3)
        Label(self.Technologies,text="INFUSION", width=30, foreground="blue").grid(row=1,column=3)
        Button(self.Technologies,text="Syndicat Biaise", command = self.patch).grid(row=4,column=2)
        Button(self.Technologies,text="UBERPlanete", command = self.patch).grid(row=2,column=2)
        Button(self.Technologies,text="Anastesie Permanente", command = self.patch).grid(row=7,column=2)
        Button(self.Technologies,text="Teleportation", command = self.patch).grid(row=11,column=2)
        Button(self.Technologies,text="Eradication des Maladies", command = self.patch).grid(row=13,column=2)
        Button(self.Technologies,text="Route Immediate", command = self.patch).grid(row=15,column=2)
        Button(self.Technologies,text="Eternite", command = self.patch).grid(row=18,column=2)
        Button(self.Technologies,text="Eradication Indigene", command = self.patch).grid(row=5,column=3)
        Button(self.Technologies,text="Entrainement Mortel", command = self.patch).grid(row=4,column=3)
        Button(self.Technologies,text="Centralisation des Unite", command = self.patch).grid(row=2,column=3)
        Button(self.Technologies,text="Pouvoir decisionel", command = self.patch).grid(row=7,column=3)
        Button(self.Technologies,text="Frappe Generale", command = self.patch).grid(row=8,column=3)
        Button(self.Technologies,text="TITANIC", command = self.patch).grid(row=10,column=3)
        Button(self.Technologies,text="Vitesse Lumiere", command = self.patch).grid(row=13,column=3)
        Button(self.Technologies,text="Scientologie Prouve", command = self.patch).grid(row=14,column=3)
        Button(self.Technologies,text="Revitalite Planetaire", command = self.patch).grid(row=17,column=3)
        Button(self.Technologies,text="Raison Universel", command = self.patch).grid(row=4,column=4)
        Button(self.Technologies,text="Theologie / Science", command = self.patch).grid(row=2,column=4)
        Button(self.Technologies,text="Comprehension de la VIE", command = self.patch).grid(row=7,column=4)
        Button(self.Technologies,text="Transformation Minerai Plate", command = self.patch).grid(row=8,column=4)
        Button(self.Technologies,text="GOD", command = self.patch).grid(row=10,column=4)
        Button(self.Technologies,text="<< Age Precedent",command = self.precedent).grid(row=1, column=2) 
        self.Technologies.mainloop
        
    def prochain(self):
        self.point+=1
        self.montrer()
        
    def precedent(self):
        self.point-=1
        self.montrer()
    def patch(self):
        pass
    def  arbreComplet(self,img):
        self.Technologies.destroy()
        self.message=Toplevel(bg='black',relief=RIDGE,bd=5)
        self.message.title("Developpement Technologique")
        self.message.geometry('+%d+%d' %(self.width/6, self.height/6) )
        pic = PhotoImage(file = 'img/technologies/arbreComplet.gif')
        Label(self.message,text='Vous avez deja toutes les technologies possibles pour votre ere',bg='black',fg='CornflowerBlue',font=("Helvetica", 14, "bold italic")).pack()
        can=Canvas(self.message,width=850,height=638,bg='black')
        can.create_image(1,1,image=img,anchor=NW)
        can.pack()
        Button(self.message,text='ok',command=self.quitter,bg="grey15",fg="CornflowerBlue",activebackground="grey10",activeforeground="CornflowerBlue",font=("Helvetica", 10, "bold"),relief=RIDGE).pack()
        
    def init(self):
        self.Technologies=Toplevel()
        self.Technologies.title("Arbre des Technologies")
        self.Technologies.geometry('+%d+%d' %(self.width/6, self.height/6) )
        self.montrer()
        